﻿using System.Collections.Generic;

namespace NoMiddleman.Core.DataInterfaces
{
    public interface IRepository<T>
    {
        T Get(int id);

        T Load(int id);

        ICollection<T> GetAll();

        ICollection<T> GetByExample(T exampleInstance, params string[] propertiesToExclude);

        ICollection<T> GetByProperties(IDictionary<string, object> propertyValuePairs);

        T Save(T entity);

        T Update(T entity);

        void Delete(T entity);

        T SaveOrUpdate(T entity);
    }
}
